package com.wanmait.recycle.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.wanmait.recycle.pojo.Rubbish;
import com.wanmait.recycle.pojo.Secondtype;

public interface SecondtypeMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Secondtype record);

    int insertSelective(Secondtype record);

    Secondtype selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Secondtype record);

    int updateByPrimaryKey(Secondtype record);
    
    void deleteByIds(String[] nn);
    
    List<Secondtype> findAll();
    
    void deleteById(Integer id);
    
    void recallById(Integer id);
    
    void insertpdz(Secondtype object);
    
    Integer findMaxId();
    
    //<!-- 根据一级分类查找二级分类列表 3.6 ad -->
    List<Secondtype> findAllByFirsttypeId(Integer id);
    
    Secondtype findBySecondtypeNameAndContent(@Param("title")String objectName, @Param("content")String content);

	List<Secondtype> findAllBySearch(@Param("searchStr")String searchStr, @Param("beginTime")String beginTime, @Param("endTime")String endTime);

	List<Secondtype> findAllBySearchRecyclable(@Param("searchStr")String searchStr, @Param("beginTime")String beginTime, @Param("endTime")String endTime);
	//更改二级分类的顺序
	void changeSortCount(@Param("id")Integer tid, @Param("sortCount")Integer count);

	Secondtype findByName(String objectName);
}